/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

/* 故事选择页面 */
.story-selection {
    padding: 30px;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.story-card {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.story-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}

.story-card.locked::after {
    content: "🔒 需要解锁";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.story-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #e9ecef;
    /*display: flex;*/
    overflow: hidden;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.story-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    max-width: none;
    max-height: none;
}

.story-card-content {
    padding: 20px;
}

.story-card-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.story-card-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* 故事阅读页面 */
.story-reading {
    padding: 30px;
}

.story-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: #5a6268;
}

.story-title {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0;
}

.story-content {
    margin-bottom: 30px;
}

.story-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #495057;
}

.story-image {
    width: 100%;
    max-width: 750px;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.story-choices {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.choice-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.choice-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 结果页面 */
.result-page {
    padding: 30px;
}

.result-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.result-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 0;
}

.result-content {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.result-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #495057;
}

.result-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.anchor-notification {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
}

.result-actions {
    text-align: center;
}

.primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 底部锚点状态 */
.footer {
    margin-top: 30px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 20px;
    color: white;
}

.anchors-status h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.anchors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.anchor-item {
    background: rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.anchor-item.obtained {
    background: rgba(40, 167, 69, 0.8);
    font-weight: bold;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .story-selection,
    .story-reading,
    .result-page {
        padding: 20px;
    }
    
    .story-header,
    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .story-title,
    .result-title {
        font-size: 1.5rem;
    }
}

.locked img {
    filter: blur(3px);
}

.story-content div {
    display: flex;
    justify-content: space-around;
}

.result-content div {
    display: flex;
    justify-content: space-around;
}

img.result-image:hover {
    transform: rotate(0deg) scale(1.1);
}

img.result-image {
    transform: rotate(-6deg);
    padding: 10px;
    margin: 50px;
    transition: .2s;
    border-radius: 0;
}